<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:shiro="http://shiro.apache.org/tags"
      >
    <h:body>
        <h:form>
            <!-- Fixed navbar -->
            <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
                <div class="container">
                    <div class="navbar-header">
                        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                        <a class="navbar-brand" href="#{request.contextPath}/home.xhtml">Mon projet</a>
                    </div>
                    <div class="navbar-collapse collapse">
                        <ul class="nav navbar-nav">
                            <li class="active"><a href="#{request.contextPath}/home.xhtml">Home</a></li>
                            <li><a href="#{request.contextPath}/about.xhtml">About</a></li>
                            <li><a href="#{request.contextPath}/demo.xhtml">Demo</a></li>
                            <shiro:notAuthenticated>
                                <li><a href="#{request.contextPath}/login.xhtml">S'identifier</a></li>
                            </shiro:notAuthenticated>
                            <shiro:authenticated>
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Bonjour #{loginController.user.username}<b class="caret"></b></a>
                                    <ul class="dropdown-menu">
                                        <li><a href="#{request.contextPath}/private/account.xhtml">Voir panier</a></li>
                                        <li><a href="#">Voir les commandes</a></li>
                                        <li><a href="#"></a></li>
                                        <li class="divider"></li>
                                        <li class="dropdown-header">Nav header</li>
                                        <li><h:commandLink actionListener="#{loginController.doLogout()}">Se déconnecter</h:commandLink></li>
                                    </ul>
                                </li>
                            </shiro:authenticated>
                        </ul>
                    </div><!--/.nav-collapse -->
                </div>
            </div>
        </h:form>
    </h:body>
</html>